/**
 * @author monirul
 */

var RoomListModel =  new Class.create({
	
	initialize: function(){
		this._roomList = {};
		this._isJoined = false;
	},
	
	init:function(o){
		if(o['roomList'] != null){
			this._roomList = o['roomList'];
		}
		this.roomListUpdated = new Event(this);
	},
	
	updateList: function(roomList) {
		this._roomList = roomList;
		this.roomListUpdated.notify({'roomList': roomList});
	},
	
	getRoomList:function(){
		return this._roomList;
	},
	
	
	setJoined: function(isJoined){
		if(isJoined != null){
			this._isJoined = isJoined;
		}
	},
	
	isJoined: function(){
		return this._isJoined;
	}
	
	
	
	
	
});
